
using Qdb;
using Qdb.Config;
using Qdb.Internal;
using Qdb.Internal.Config;

namespace Qdb.Internal
{
	public class ObjectContainerFactory
	{
		/// <exception cref="Qdb.Ext.OldFormatException"></exception>
		public static IEmbeddedObjectContainer OpenObjectContainer(IEmbeddedConfiguration
			 config, string databaseFileName)
		{
			IConfiguration legacyConfig = QdbLegacyConfigurationBridge.AsLegacy(config);
			Config4Impl.AssertIsNotTainted(legacyConfig);
			EmitDebugInfo();
			IEmbeddedObjectContainer oc = new IoAdaptedObjectContainer(legacyConfig, databaseFileName
				);
			((EmbeddedConfigurationImpl)config).ApplyConfigurationItems(oc);
			Qdb.Internal.Messages.LogMsg(legacyConfig, 5, databaseFileName);
			return oc;
		}

		private static void EmitDebugInfo()
		{
		}
	}
}
